﻿using System;
using SharpChannel.Util;

namespace SharpChannel.Rpc.Serialization
{
    public class FormatterManager : SharpSingleton<FormatterManager>
    {
        public Func<ISerializable> SharpFormatterFunc { get; set; }

        public ISerializable GetSerializable()
        {
            return SharpFormatterFunc != null ? SharpFormatterFunc() : new DefaultBinaryFormatter();
        }
    }
}
